com.highdeal.pnr.hci
Class CreditLimitBalanceModel

java.lang.Object
  extended by com.highdeal.pnr.hci.CreditLimitBalanceModel
All Implemented Interfaces:
XMLMarshallable

public class CreditLimitBalanceModel
extends java.lang.Object
implements XMLMarshallable

This Java class represents a credit limit balance defined in a subscriber account stored in customer master data owned by a service provider; A credit limit balance is a monetary counter associated to a currency and intended to limit the use of a marketable service for a time period.

A credit limie balance add one or more amount alerts to this credit limit balance.

See Also:
SubscriberAccountModel, AmountAlertModel

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="creditLimitBalance">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="amountAlert" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>   
     <xs:attribute name="code" type="xs:string" use="required"/> 
     <xs:attribute name="description" type="xs:string"/> 
     <xs:attribute name="currency" type="xs:string" use="required"/>
     <xs:attribute name="amount" type="xs:string" use="required"/>
     <xs:attribute name="creditLimit" type="xs:string"/>
     <xs:attribute name="isDefault" type="xs:boolean"/>
     <xs:attribute name="referenceDate" type="xs:dateTime"/>
     <xs:attribute name="resetRecurringDates" type="xs:string"/>
   </xs:complexType>
 </xs:element>


Constructor Summary
CreditLimitBalanceModel()
          Builds an empty credit limit balance.
CreditLimitBalanceModel(java.lang.String code, java.lang.String description, java.math.BigDecimal amount, java.lang.String currency, java.math.BigDecimal creditLimit)
          Builds an credit limit balance.
 
Method Summary
 void addAmountAlert(AmountAlertModel alert)
          Adds a AmountAlertModel to this credit limit balance amount alerts list.
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.math.BigDecimal getAmount()
          Gets the amount of the credit limit balance.
 int getAmountAlertCount()
          Gets the size of this credit limit balance amount alerts list.
 java.util.Iterator<AmountAlertModel> getAmountAlertIterator()
          Gets this credit limit balance amount alerts list iterator.
 AmountAlertModel[] getAmountAlerts()
          Gets this credit limit balance amount alerts list.
 java.lang.String getCode()
          Gets the code of the credit limit balance.
 RatingContextDescription getContext(ContextualNode child)
           
 java.math.BigDecimal getCreditLimit()
          Gets the credit limit amount of the credit limit balance.
 java.lang.String getCurrencyCode()
          Gets the currency code of the credit limit balance.
 java.lang.String getDescription()
          Gets the description of the credit limit balance.
 java.util.Date getReferenceDate()
          Gets the reference date of the credit limit balance.
 RecurringDateModel getResetRecurringDate()
          Gets the reset recurring date of the credit limit balance.
 RatingContextDescription inheritedContext()
           
 boolean isDefault()
          Tests if this credit limit balance is the default one.
 void isDefault(boolean isDefault)
          Sets this credit limit balance to be the default one.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 boolean removeAmountAlert(AmountAlertModel alert)
          Removes a AmountAlertModel to this credit limit balance amount alerts list.
 AmountAlertModel removeAmountAlert(int index)
          Removes a AmountAlertModel at given index to this credit limit balance amount alerts list.
 void setAmount(java.math.BigDecimal amount)
          Sets the amount of the credit limit balance.
 void setAmountAlerts(AmountAlertModel[] alerts)
          Sets this credit limit balance amount alerts list.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setCode(java.lang.String code)
          Sets the code of the credit limit balance.
 void setCreditLimit(java.math.BigDecimal creditLimit)
          Sets the credit limit amount of the credit limit balance.
 void setCurrencyCode(java.lang.String currencyCode)
          Sets the currency code of the credit limit balance.
 void setDescription(java.lang.String description)
          Sets the description of the credit limit balance.
 void setReferenceDate(java.util.Date referenceDate)
          Sets the reference date of the credit limit balance.
 void setResetRecurringDate(RecurringDateModel resetRecurringDate)
          Sets the reset recurring date of the credit limit balance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreditLimitBalanceModel

public CreditLimitBalanceModel()
Builds an empty credit limit balance.


CreditLimitBalanceModel

public CreditLimitBalanceModel(java.lang.String code,
                               java.lang.String description,
                               java.math.BigDecimal amount,
                               java.lang.String currency,
                               java.math.BigDecimal creditLimit)
Builds an credit limit balance.

Parameters:
code - The identification code of the credit limit balance
description - The description of the credit limit balance
amount - The amount of the credit limit balance
currency - The currency of the credit limit balance
creditLimit - The credit limit amount of the credit limit balance
Method Detail

getAmount

public java.math.BigDecimal getAmount()
Gets the amount of the credit limit balance.

Returns:
The amount of the credit limit balance

setAmount

public void setAmount(java.math.BigDecimal amount)
Sets the amount of the credit limit balance.

Parameters:
amount - The amount of the credit limit balance

getCode

public java.lang.String getCode()
Gets the code of the credit limit balance.

Returns:
The code of the credit limit balance

setCode

public void setCode(java.lang.String code)
Sets the code of the credit limit balance.

Parameters:
code - The code of the credit limit balance

getDescription

public java.lang.String getDescription()
Gets the description of the credit limit balance.

Returns:
The description of the credit limit balance

setDescription

public void setDescription(java.lang.String description)
Sets the description of the credit limit balance.

Parameters:
description - The description of the credit limit balance

getCreditLimit

public java.math.BigDecimal getCreditLimit()
Gets the credit limit amount of the credit limit balance.

Returns:
The credit limit amount of the credit limit balance

setCreditLimit

public void setCreditLimit(java.math.BigDecimal creditLimit)
Sets the credit limit amount of the credit limit balance.

Parameters:
creditLimit - The credit limit amount of the credit limit balance

getCurrencyCode

public java.lang.String getCurrencyCode()
Gets the currency code of the credit limit balance.

Returns:
The currency code of the credit limit balance

setCurrencyCode

public void setCurrencyCode(java.lang.String currencyCode)
Sets the currency code of the credit limit balance.

Parameters:
currencyCode - The currency code of the credit limit balance

getResetRecurringDate

public RecurringDateModel getResetRecurringDate()
Gets the reset recurring date of the credit limit balance.

Returns:
The reset recurring date of the credit limit balance

setResetRecurringDate

public void setResetRecurringDate(RecurringDateModel resetRecurringDate)
Sets the reset recurring date of the credit limit balance.

Parameters:
resetRecurringDate - The RecurringDateModel of the credit limit balance

getReferenceDate

public java.util.Date getReferenceDate()
Gets the reference date of the credit limit balance.

Returns:
The reference date of the credit limit balance

setReferenceDate

public void setReferenceDate(java.util.Date referenceDate)
Sets the reference date of the credit limit balance.

Parameters:
referenceDate - The reference date of the credit limit balance

isDefault

public boolean isDefault()
Tests if this credit limit balance is the default one.

Returns:
true if this credit limit balance is the default one, false otherwise

isDefault

public final void isDefault(boolean isDefault)
Sets this credit limit balance to be the default one.

Parameters:
isDefault - The boolean value to define if this credit limit balance is the default one

addAmountAlert

public void addAmountAlert(AmountAlertModel alert)
Adds a AmountAlertModel to this credit limit balance amount alerts list.

Parameters:
alert - The AmountAlertModel to be added

removeAmountAlert

public boolean removeAmountAlert(AmountAlertModel alert)
Removes a AmountAlertModel to this credit limit balance amount alerts list.

Parameters:
alert - The AmountAlertModel to be removed
Returns:
true if the alert is successfully removed, false otherwise

removeAmountAlert

public AmountAlertModel removeAmountAlert(int index)
Removes a AmountAlertModel at given index to this credit limit balance amount alerts list.

Parameters:
index - The index of the AmountAlertModel to be removed
Returns:
The removed AmountAlertModel

getAmountAlertCount

public int getAmountAlertCount()
Gets the size of this credit limit balance amount alerts list.

Returns:
The size of this credit limit balance amount alerts list

getAmountAlerts

public AmountAlertModel[] getAmountAlerts()
Gets this credit limit balance amount alerts list.

Returns:
This credit limit balance amount alerts list

getAmountAlertIterator

public java.util.Iterator<AmountAlertModel> getAmountAlertIterator()
Gets this credit limit balance amount alerts list iterator.

Returns:
This credit limit balance amount alerts list iterator

setAmountAlerts

public void setAmountAlerts(AmountAlertModel[] alerts)
Sets this credit limit balance amount alerts list.

Parameters:
alerts - The list of AmountAlertModel of this credit limit balance amount alerts list

getContext

public RatingContextDescription getContext(ContextualNode child)

inheritedContext

public RatingContextDescription inheritedContext()

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)